/**
 */
package fUML.Semantics.Activities.CompleteStructuredActivities;

import fUML.Semantics.Actions.BasicActions.ActionActivation;

import fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivationGroup;

import fUML.Semantics.Classes.Kernel.Value;

import fUML.Syntax.Actions.BasicActions.OutputPin;

import fUML.Syntax.Activities.CompleteStructuredActivities.ExecutableNode;

import fUML.Syntax.Activities.IntermediateActivities.ActivityNode;

import org.eclipse.emf.common.util.EList;

/**
 * <!-- begin-user-doc -->
 * A representation of the model object '<em><b>Structured Activity Node Activation</b></em>'.
 * <!-- end-user-doc -->
 *
 * <!-- begin-model-doc -->
 * A structured activity node activation is an action activation for an action that
 *                 is a structured activity node.
 * <!-- end-model-doc -->
 *
 * <p>
 * The following features are supported:
 * <ul>
 *   <li>{@link fUML.Semantics.Activities.CompleteStructuredActivities.StructuredActivityNodeActivation#getActivationGroup <em>Activation Group</em>}</li>
 * </ul>
 * </p>
 *
 * @see fUML.Semantics.Activities.CompleteStructuredActivities.CompleteStructuredActivitiesPackage#getStructuredActivityNodeActivation()
 * @model
 * @generated
 */
public interface StructuredActivityNodeActivation extends ActionActivation {
	/**
	 * Returns the value of the '<em><b>Activation Group</b></em>' containment reference.
	 * It is bidirectional and its opposite is '{@link fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivationGroup#getContainingNodeActivation <em>Containing Node Activation</em>}'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * <!-- begin-model-doc -->
	 * The group of activations of the activity nodes contained in the structured
	 *                   activity node.
	 * <!-- end-model-doc -->
	 * @return the value of the '<em>Activation Group</em>' containment reference.
	 * @see #setActivationGroup(ActivityNodeActivationGroup)
	 * @see fUML.Semantics.Activities.CompleteStructuredActivities.CompleteStructuredActivitiesPackage#getStructuredActivityNodeActivation_ActivationGroup()
	 * @see fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivationGroup#getContainingNodeActivation
	 * @model opposite="containingNodeActivation" containment="true" required="true" ordered="false"
	 * @generated
	 */
	ActivityNodeActivationGroup getActivationGroup();

	/**
	 * Sets the value of the '{@link fUML.Semantics.Activities.CompleteStructuredActivities.StructuredActivityNodeActivation#getActivationGroup <em>Activation Group</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @param value the new value of the '<em>Activation Group</em>' containment reference.
	 * @see #getActivationGroup()
	 * @generated
	 */
	void setActivationGroup(ActivityNodeActivationGroup value);

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @model
	 * @generated
	 */
	void doStructuredActivity();

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * <!-- begin-model-doc -->
	 * // Return an activity node list containing the given list of executable nodes
	 *                   
	 *  // and any pins that they own.
	 *  
	 *  ActivityNodeList
	 *                   activityNodes = new ActivityNodeList();
	 *  
	 *  for (int i = 0; i
	 *                   < nodes.size(); i++) {
	 *  ActivityNode node =
	 *                   nodes.getValue(i);
	 *  activityNodes.addValue(node);
	 *  
	 *  if
	 *                   (node instanceof Action) {
	 *  Action action = (Action)node;
	 *                   
	 *  InputPinList inputPins = action.input;
	 *  for (int j = 0; j
	 *                   < inputPins.size(); j++) {
	 *  InputPin inputPin =
	 *                   inputPins.getValue(j);
	 *  activityNodes.addValue(inputPin);
	 *                   }
	 *  
	 *  OutputPinList outputPins = action.output;
	 *  for (int j
	 *                   = 0; j < outputPins.size(); j++) {
	 *  OutputPin outputPin =
	 *                   outputPins.getValue(j);
	 *  activityNodes.addValue(outputPin);
	 *                   }
	 *  }
	 *  }
	 *  
	 *  return activityNodes;
	 *  
	 * <!-- end-model-doc -->
	 * @model ordered="false" nodesMany="true" nodesOrdered="false"
	 * @generated
	 */
	EList<ActivityNode> makeActivityNodeList(EList<ExecutableNode> nodes);

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * <!-- begin-model-doc -->
	 * // Return the values of the tokens on the pin activation corresponding to the
	 *                   given pin in the internal activation group for this node activation.
	 *                   
	 *  PinActivation pinActivation =
	 *                   (PinActivation)(this.activationGroup.getNodeActivation(pin));
	 *  TokenList
	 *                   tokens = pinActivation.getTokens();
	 *  
	 *  ValueList values = new
	 *                   ValueList();
	 *  for (int i = 0; i < tokens.size(); i++) {
	 *                   Token token = tokens.getValue(i);
	 *  Value value =
	 *                   ((ObjectToken)token).value;
	 *  if (value != null) {
	 *                   values.addValue(value);
	 *  }
	 *  }
	 *  
	 *  return
	 *                   values;
	 *  
	 * <!-- end-model-doc -->
	 * @model ordered="false" pinRequired="true" pinOrdered="false"
	 * @generated
	 */
	EList<Value> getPinValues(OutputPin pin);

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * <!-- begin-model-doc -->
	 * // Place tokens for the given values on the pin activation corresponding to
	 *                   the given output pin on the internal activation group for this node
	 *                   activation.
	 *  
	 *  PinActivation pinActivation =
	 *                   (PinActivation)(this.activationGroup.getNodeActivation(pin));
	 *  
	 *                   for (int i = 0; i < values.size(); i++) {
	 *  Value value =
	 *                   values.getValue(i);
	 *  ObjectToken token = new ObjectToken();
	 *                   token.value = value;
	 *  pinActivation.addToken(token);
	 *  }
	 *                   
	 *  
	 * <!-- end-model-doc -->
	 * @model pinRequired="true" pinOrdered="false" valuesMany="true" valuesOrdered="false"
	 * @generated
	 */
	void putPinValues(OutputPin pin, EList<Value> values);

} // StructuredActivityNodeActivation
